package com.edgar.paysdk

import android.content.Context

/**
 * Created by edgar on 18-1-20.
 */
object Utils {

    fun hasApplicationInstalled(context: Context,packageName:String):Boolean{
        val pm = context.packageManager
        val packages = pm.getInstalledPackages(0)
        return packages.any { it.packageName == packageName }
    }

    fun hasWeChatInstalled(context: Context):Boolean = hasApplicationInstalled(context,"com.tencent.mm")
}